home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / comm / cnet / compulist21.lha / Compulist / Wait.rexx < prev   
OS/2 REXX Batch file  |  1999-01-15  |  5KB  |  140 lines

  1. /********** Automaticly generated header, don't edit ************************
  2.  *
  3.  * PROGRAM:       FPWait.rexx
  4.  *
  5.  * PURPOSE:       Animated Wait prompt for use in SYS.WELCOME or other places.
  6.  *
  7.  * AUTHOR:        Peter Klein. (PMK)
  8.  *
  9.  * DATE:          01 Oct 95                         
  10.  *
  11.  * TIME:          21:31:17                         
  12.  *
  13.  * VERSION:       0
  14.  * REVISION:      2
  15.  * SUBREVISION:   0
  16.  *
  17.  * CNET VERSION:  3.05c
  18.  *
  19.  * LOG:
  20.  * 
  21.  *  01 Oct 95 Added ability to disable some of the modes when using the Random
  22.  *            Mode.  This is for all of you who don't like the Jump Mode :)
  23.  *  12 Sep 95 First Version!.
  24.  * 
  25.  * INSTALLATION:
  26.  *
  27.  *  Add this to your SYSTEXT:SYS.WELCOME (or where ever you want it)
  28.  *
  29.  *     #0Pfiles:FPWait.rexx}
  30.  *
  31.  *
  32.  * ARGUMENTS:
  33.  * 
  34.  *  FPWait.rexx can also be called with arguments. The syntax is:
  35.  *
  36.  *  FPWait.rexx <mode> [<text>]
  37.  *
  38.  *  Where <mode> is the mode of prompt. (see below)
  39.  *        <text> is the text to show on prompt. (optional.)
  40.  *
  41.  *  The <mode> argument MUST be specified when using the <text> argument,
  42.  *  and the <text> argument should be enclosed in "". as in this example:
  43.  *
  44.  *   #0Pfiles:FPWait.rexx 0 " This is a Pfile from Flux Point "}
  45.  *
  46.  *
  47.  *  MODES:
  48.  *
  49.  *  0 = Random (Mode 1-10)
  50.  *  1 = Background draw/delete.
  51.  *  2 = Scroll text from right to left.
  52.  *  3 = Scroll text from left to right.
  53.  *  4 = Move text from side to side.
  54.  *  5 = Move text up and down. (Jump)
  55.  *  6 = Standard Twirly.
  56.  *  7 = Cursor Twirly.
  57.  *  8 = Pacman Twirly.
  58.  *  9 = Clock Twirly.
  59.  * 10 = Moving Cursor.
  60.  * ==========================================================================
  61.  *
  62.  *   Another
  63.  *        _____ __    __  __ __  __     ___   ____   __ __  __ ______
  64.  *       / ___// /   / / / / \ \/ /    / _ \ / __ \ / //  \/ //_  __/
  65.  *      / __/ / /__ / /_/ /  /   /    / ___// /_/ // // /\  /  / /
  66.  *     /_/   /____/ \____/  /_/\_\   /_/    \____//_//_/ /_/  /_/    
  67.  *
  68.  *                          P R O D U C T I O N
  69.  *
  70.  *               Call +45 3526-2527     -    28k8 VFC/V34
  71.  *
  72.  *  FIDO 2:235/202   AMIGANET 39:141/139   CLINK 912:2000/4   WARP 138:1/102
  73.  *
  74.  ***************************************************************************/
  75.  
  76. /* ================= Start of Sysop definable variables. ================= */
  77.  
  78. norandom='5'            /* Don't use these types in Random mode.    */
  79.  
  80. /* ================== End of Sysop definable variables. ================== */
  81.  
  82. options results;signal on error;signal on syntax;signal on ioerr
  83. if ~show('l','rexxsupport.library') then if ~addlib('rexxsupport.library',0,-30,0) then exit
  84. if ARG()=2 then ;txt=ARG(2);else txt=" Hit Any Key To Continue "
  85. getuser 27;w=result;l=length(txt);z=(w-l)%2;getuser 28;te=result>1;getuser 1100460;an=result>0
  86.  
  87. sendstring 'n1'copies(' ',z)word('r1 z1cf',an+1)txt'r0z0<'l'}'
  88. if te&an then do
  89.     a=0;if ARG(1)~='' then a=ARG(1)
  90.     do while a<1|a>10;a=random(0,11,time('s'));if find(norandom,a)>0 then a=0;end
  91.     interpret('call MODE'a)
  92. end;else getchar
  93. exit
  94.  
  95. MODE1:;p=0;r=1
  96. do forever;maygetchar;if result~='NOCHAR' then leave
  97.     p=p+1;if p=1 then r=~r
  98.     else if p=l+1 then do;sendstring '<'l'}';r=~r;p=1;end
  99.     sendstring 'z'r*1||substr(txt,p,1);call delay(1)
  100. end;transmit '<'p'}z1'txt'z0';return
  101.  
  102. MODE2:;call SCROLL(1);return
  103. MODE3:;call SCROLL(0);return
  104. SCROLL:;arg r;t=txt
  105. do forever;maygetchar;if result~='NOCHAR' then leave
  106.     t=right(t,(l-2)*r+1)left(t,(l-2)*~r+1)
  107.     sendstring 'z1't'z0<'l'}';call delay(3)
  108. end;transmit 'z1'txt'z0';return
  109.  
  110. MODE4:;sendstring '<'z'}';p=z;r=-1
  111. do forever;maygetchar;if result~='NOCHAR' then leave
  112.     p=p+r;if p=0|p=z*2-1 then r=-r;call delay(2)
  113.     sendstring ''word('P . @',r+2)
  114. end;transmit 'q1';return
  115.  
  116. MODE5:;sendstring '^1';r=1
  117. do forever;maygetchar;if result~='NOCHAR' then leave
  118.      r=~r;sendstring ''word('M L',r+1);call delay(5)
  119. end;transmit 'q1';return
  120.  
  121. MODE6:;call TWIRL('-/|\-',1);return
  122. MODE7:;call TWIRL('Û',3);return
  123. MODE8:;call TWIRL('->|<=',2);return
  124. MODE9:;call TWIRL('¿ÙÀÚ',2);return
  125. TWIRL:;arg c,d;f=1;p=1;r=1
  126. do forever;maygetchar;if result~='NOCHAR' then leave
  127.     sendstring 'z1'left(txt,p)'c3'substr(c,f,1)'cf'substr(txt,p+2)'z0<'l'}'
  128.     call delay(d);f=f+1;if f>length(c) then do;f=1;p=p+r;if p=0|p=l-1 then r=-r;end
  129. end;transmit 'z1'txt'z0';return
  130.  
  131. MODE10:;p=0;r=1
  132. do forever;maygetchar;if result~='NOCHAR' then leave
  133.     sendstring 'z1'left(txt,p)'r1'substr(txt,p+1,1)'r0'substr(txt,p+2)'z0<'l'}'
  134.     call delay(3);p=p+r;if p=0|p=l-1 then r=-r
  135. end;transmit 'z1'txt'z0';return
  136.  
  137. SYNTAX:;ERROR:;IOERR:;e0='Error in line: 'left(sigl,4)' File: ';e1='Error Code 'rc' <'errortext(rc)'>';e2=sourceline(sigl)
  138. getuser 1311992;e0=e0||result;getuser 1311960;e0=e0||result;call log(e0);call log(e1);call log(e2);bufferflush;exit
  139. LOG:;er=ARG(1);transmit er;do a=0 to length(er)%45;logentry substr(er,a*45+1,45);end;return
  140.